package com.kgcx.system.controller;

import com.kgcx.common.bean.ReturnData;
import com.kgcx.common.controller.BaseController;
import com.kgcx.system.domain.SysRole;
import com.kgcx.system.domain.SysRoleMenu;
import com.kgcx.system.service.SysRoleMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 何凯
 * @version 0.1
 * @description
 * @time 2017/12/14 20:26
 * @since 0.1
 */
@Api(description = "系统角色菜单", tags = "系统角色菜单接口")
@RestController
@RequestMapping("sys/v1/roleMenu")
public class SysRoleMenuController extends BaseController{
    @Autowired
    private SysRoleMenuService sysRoleMenuService;

	@ApiOperation(value = "修改系统角色菜单", httpMethod = "POST", notes = "修改系统角色菜单接口")
	@PostMapping(value = "update")
	public ReturnData<SysRoleMenu> updateSysRoleMenu(@RequestBody List<SysRoleMenu> list){
	        sysRoleMenuService.updateRoleMenu(list);
		return new ReturnData<>();
	}
}
